import request from '@/utils/request'
import { AxiosPromise } from 'axios'

enum Api {
  list = '/ledgerSettle/list',
  add = '/ledgerSettle/add',
  detail = '/ledgerSettle/detail',
}

// 获取列表
export const ledgerSettleList = (data: any): AxiosPromise<any[]> => {
  return request({
    url: Api.list,
    method: 'post',
    data,
  })
}

// 编辑、保存
export const ledgerSettleAdd = (data: any) => {
  return request({
    url: Api.add,
    method: 'post',
    data,
  })
}

// 获取设备详情
export const ledgerSettleDetail = (data: any) => {
  return request({
    url: Api.detail,
    method: 'post',
    data,
  })
}
